package com.lagou.gateway.filter;

import org.springframework.cloud.gateway.filter.NettyWriteResponseFilter;
import org.springframework.core.Ordered;

public class FilterOrder {
    // 接收到netty消息时第一时间执行filter进行转换
    public static final int STANDARD_RESPONSE_FILTER_ORDER
            = NettyWriteResponseFilter.WRITE_RESPONSE_FILTER_ORDER - 1;
    public static final int REMOVE_PRIVATE_HEADER_FILTER_ORDER
            = Ordered.HIGHEST_PRECEDENCE;

    //必须在协议转换filter之前执行
    public static final int LIMIT_BLACK_IP_FILTER_ORDER
            = STANDARD_RESPONSE_FILTER_ORDER - 1;

}
